<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="h" %>

<h:body title="title">
    <center>
    <h1>Course list</h1>

    <table border="1">
        <tr>
            <th>name</th>
        </tr>
        <c:forEach var="course" items="${courses}">
            <tr>
                <td><a href="courseView.htm?id=${course.id}"><c:out value="${course.name}" /></a></td>
                <td><a href="<c:url value="/courseDelete.htm?id=${course.id}"/>">Delete</a></td>
            </tr>
        </c:forEach>
    </table>

    <a href="courseEdit.htm">Create a course</a>

    </center>
</h:body>
